#ifndef HTF_AI_MODEL_H
#define HTF_AI_MODEL_H

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
    ACTIVATION_NONE = 0,
    ACTIVATION_RELU,
    ACTIVATION_SIGMOID,
    ACTIVATION_TANH
} activation_type_t;

typedef struct {
    int input_size;
    int output_size;
    const float* weight;  // Weights: [input_size * output_size]
    const float* bias;    // Bias: [output_size]
    activation_type_t act;
} layer_t;

// Declare model layer data retrieval function (to be implemented in .c)
extern const layer_t* htf_ai_get_model_layers(int* layer_count);

// Inline activation function (to avoid linking issues)
static inline float relu(float x) {
    return (x > 0.0f) ? x : 0.0f;
}

static inline float sigmoid(float x) {
    return 1.0f / (1.0f + __builtin_expf(-x));
}

static inline float tanh_f(float x) {
    return __builtin_tanhf(x);
}

#ifdef __cplusplus
}
#endif

#endif // HTF_AI_MODEL_H